home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / modula2f.zip / SCREEN.DEF < prev    next >
Text File  |  1992-07-02  |  1KB  |  35 lines

  1. (* Screen   BIOS screen routines   Chris Harshman   1992
  2.     These procedures are useful for working with screen data directly,
  3. such as reading a character at a point on the screen, or making a copy of the
  4. screen to hold for later.  *)
  5.  
  6. DEFINITION MODULE Screen;
  7.  
  8. TYPE ScreenData = ARRAY [0..6599] OF CHAR;
  9.  
  10. PROCEDURE SaveScreen(VAR s:ScreenData);
  11.     (* Saves all screen data into the array s, includes characters and
  12.        colors used.  Call before a SetWindow to later erase the window
  13.        from the screen. *)
  14.  
  15. PROCEDURE RestoreScreen(VAR s:ScreenData);
  16.     (* Restores all screen data back to the screen from array s.  Call to
  17.        return the screen to its previous conditions when SaveScreen was
  18.        called. *)
  19.  
  20. PROCEDURE GetPosition(VAR v,h:CARDINAL);
  21.     (* Returns the row and column of the cursor's position.  The coordinates
  22.        v and h will be screen relative not window relative. *)
  23.  
  24. PROCEDURE GetChar(VAR ch:CHAR; VAR fc,bc:CARDINAL);
  25.     (* Returns the character and its foreground and background colors at the
  26.        current cursor location.  Use SetCursor before using to be accurate. *)
  27.  
  28. PROCEDURE PrintScreen();
  29.     (* Simmilar to pressing Ctrl-PrtSc.  Dumps the screen to the printer. *)
  30.  
  31. PROCEDURE CursorOff();
  32.     (* Turns the text screen cursor off.  To turn back on, call the procedure
  33.        for setting the used text video mode, ex. SetText *)
  34.  
  35. END Screen.